/**
 * Created by leiweibo on 7/11/15.
 */


var app = angular.module('officeaggregatecontroller', []);
var count = 0;

app.controller('OfficeAggregateCtrl', function ($scope, OfficeAggregateService, $routeParams) {

  var hospitalId = $routeParams.param;
  OfficeAggregateService.list_by_hospital(hospitalId, function(res, data) {

    if (res.result == true) {
      $scope.offices = res.offices;
      console.log('get the data:' + res);
    } else {
      $scope.error_msg = res.message;
      console.log('get the 11111:' + $scope.hospitalsData);
    }
  });

});

